// 674.cpp : Defines the entry point for the console application.
//
#include <iostream>
#include <iterator>
#include <vector>
#include <algorithm>
using namespace std;

const int Coins[] = { 1, 5, 10, 25, 50 };
const int CoinsCount = sizeof( Coins ) / sizeof( int );


int main(int argc, char* argv[])
{
	vector<int> amounts;
	copy(istream_iterator<int>(cin), istream_iterator<int>(), back_inserter(amounts));

	int max = *std::max_element( amounts.begin(), amounts.end() );

	int* F = new int[max + 1];
	memset( F, 0, sizeof(int) * ( max + 1 ) );
	F[0] = 1;
	for( int i = 1; i <= max; i++ )
	{
		F[i] = 1;
	}

	for( int i = 1; i < CoinsCount; i++ )
	{
		for( int j = Coins[i]; j <= max; j++ )
		{
			F[j] = F[j] + F[j - Coins[i]];
		}
	}

	for( vector<int>::iterator it = amounts.begin(); it != amounts.end(); it++ )
	{
		cout << F[*it] << endl;
	}
	return 0;
}

